package com.wuyou.securitydemo.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 认证配置
 *
 * @author zouchenglong
 * @date 20220316
 */
@Data
@Configuration(proxyBeanMethods = false)
@ConfigurationProperties("auth")
public class AuthConfig {

    /**
     * 是否开启验证码
     */
    private Boolean validateCode = true;

    /**
     * 认证类型
     */
    private AuthType type = AuthType.LOCAL;

    /**
     * 认证地址
     */
    private String authUrl;

    /**
     * 用户信息地址
     */
    private String userInfoUrl;

    /**
     * 客户端ID
     */
    private String clientId;

    private String[] ignoreUrls;

    public enum AuthType {
        REMOTE,
        LOCAL
    }

}
